<%-- 
    Document   : index
    Created on : 27-09-2011, 20:13:43
    Author     : Mr-Nguyen
--%>

<%@page import="DatabasePOJO.linhvuc"%>
<%@page import="java.util.ArrayList"%>
<%@page import="DAO.linhvucDAO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <link href="Images/bridge3D.ico" type="image/x-icon" rel="icon" /><link href="Images/bridge3D.ico" type="image/x-icon" rel="shortcut icon" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Deal today</title>
<style type="text/css">
<!--
.ctyleMenu {
	background-image:url(Images/backngang.gif);
}
a:link {
	text-decoration: none;
	color: #00F;
}
a:visited {
	text-decoration: none;
	color: #00F;
}
a:hover {
	text-decoration: none;
	color: #00F;
}
a:active {
	text-decoration: none;
	color: #00F;
}
-->
</style>
<script type="text/javascript">
    function Them()
    {
        alert("Chuỗi bình luận của bạn đã được đăng.");        
    }
</script>
  
<script language="JavaScript" src="js/jsScript.js"></script>


</head>

<body>

<table width="100%" height="100%" border="0">
    <tr>
        <td align="center" valign="top">
            <table width="900" border="0" cellpadding="0" cellspacing="0" >
                <tr>
                    <td height="79" colspan="6"><img src="Images/topbody.jpg" alt="" width="956" height="100" /></td>
                </tr>
                <tr class="ctyleMenu" >
                    <td width="156" height="44"><a href="index.jsp"><img src="Images/today.gif" width="142" height="39" /></a></td>
                    <td width="164"><a href="index.jsp?dealpreview=true"><img src="Images/preview.gif" width="152" height="40" /></a></td>
                    <td width="89"><a href="#"><img src="Images/event.gif" width="79" height="40" /></a></td>
                    <td width="109"><a href="#"><img src="Images/nap.gif" width="89" height="40" /></a></td>
                    <td width="124"><a href="#"><img src="Images/help.gif" width="118" height="39" /></a></td>
                    <td width="258" align="right">
                         <jsp:include page="Pages/KhungDangNhap.jsp" />
                    </td>
                </tr>
                <tr>
                    <td height = "20" colspan="6" background="Images/backmenu.gif">
                    <a href="#"> Tất cả |</a>
                    <% 
                    ArrayList<linhvuc> arr = linhvucDAO.getListlinhvuc();
                    for(int i=0;i< (arr.size() - 1);i++){
                    %>
                    <a href="index.jsp?maLinhVuc=<%= arr.get(i).getMaLinhVuc() %>"> <%= arr.get(i).getTenLinhVuc() %> | </a>
                    <%
                    }  
                    %>
                    <a href="index.jsp?maLinhVuc=<%= arr.get((arr.size()-1)).getMaLinhVuc() %>"> <%= arr.get((arr.size()-1)).getTenLinhVuc() %> </a>
                    </td>
                </tr>
                <tr>
                    <td colspan="6" hieght="30"> </td>
                </tr>
                <tr>
                    <td width="80%" height="284" colspan="5" valign="top">

                        <!-- table body -->
                        <%if(request.getParameter("ActionHD") != null){%>
                            <jsp:include page="Pages/huongDanZing.jsp" >
                            <jsp:param name="hd" value="<%= request.getParameter("ActionHD") %>"/>
                            </jsp:include>
                        <%}
                        else if(request.getParameter("MaspMua") != null){%>
                              <jsp:include page="Pages/muahang.jsp"/>
                        <%} 
                        else if(request.getParameter("dealpreview") != null){%>
                              <jsp:include page="Pages/dealtruocday.jsp"/>
                        <%}
                        else if(request.getParameter("DangKi")!=null){%>
                              <jsp:include page="Pages/DangKi.jsp" />
                        <%}
                        else if(request.getParameter("DangNhap")!=null){%>
                              <jsp:include page="Pages/DangNhap.jsp" />
                        <%}
                                       else if(request.getParameter("CapNhatNguoiDung")!=null){%>
                                  <jsp:include page="Pages/CapNhatNguoiDung.jsp" />           
                                      <% }
                        else {%>
                        <jsp:include page="Pages/bodysanpham.jsp" />
                        <%}%>
                        <!-- Ket thuc lập lại cho sản phẩm-->
                        <!-- table body --> 
                       </td>
                     
                        <td width="20%" valign="top" >
                        <table width="212" height="783" border="0">
                            <tr>
                                <td width="202" height="342" valign="top"><img src="Images/nearhot.png" width="224" height="335" /></td>
                            </tr>
                            <tr>
                                <td height="5">
                                    <table width="100%" border="0" >
                                        <tr>
                                            <td height="33" colspan="2" align="center" background="Images/backmenu.gif">Hướng dẫn nạp thẻ</td>
                                        </tr>
                                        <tr>
                                            <td  valign="middle" background="Images/backngang.gif">
                                                <img src="Images/check.jpg" />
                                            </td>
                                            <td  valign="middle" background="Images/backngang.gif">
                                                <a href="index.jsp?ActionHD=naptheATM"> Nạp thẻ ATM</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td  valign="middle" background="Images/backngang.gif">
                                                <img src="Images/zingme.jpg" />
                                            </td>
                                            <td valign="middle" background="Images/backngang.gif">
                                                <a href="index.jsp?ActionHD=naptheZing">Nạp thẻ zing</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td  valign="middle" background="Images/backngang.gif">
                                                <img src="Images/icon-thuong.jpg" />
                                            </td>
                                            <td valign="middle" background="Images/backngang.gif">
                                                <a href="index.jsp?ActionHD=chuyenkhoan">Chuyển khoảng</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="30"  valign="middle" background="Images/backngang.gif">
                                                <img src="Images/donghocat.jpg" width="25" height="26" />
                                            </td>
                                            <td valign="middle" background="Images/backngang.gif">
                                                <a href="index.jsp?ActionHD=giaohang">Phiếu giao hàng tận nơi</a>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td height="5">&nbsp;</td>
                            </tr>
                            <tr>
                                <td height="409">
                                    <jsp:include page="Pages/rightSanpham.jsp"/>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    </table>
<img src="Images/footer.jpg" alt="" width="1219" height="121" />
<%
if(request.getAttribute("message") != null){
    %>
    <script type="text/javascript">
        alert ("Tạm thời chưa có sản phẩm nào thuộc lĩnh vực này !");
    </script>
<%
request.removeAttribute("message");
}

if(request.getAttribute("ck") != null){
    %>
    <script type="text/javascript">
        alert ("Chức năng này đang được xây dựng !");
        window.back();
    </script>
<%
request.removeAttribute("ck");
}
%>
</body>
</html>
